<template>
  <div class="appForm">
    <template v-for="(item, index) in props.componentObject.headInfo" :key="index">
      <!-- 其他信息 -->
      <basic-info  :list="props.componentObject?.baseData[item.code]" :itemInfo="item"></basic-info>
    </template>
    <!-- 附件 -->
    <!-- <file-info :itemInfo="props.componentObject?.attachment"></file-info> -->
    <!-- 表格 -->
    <table-info
      v-for="(item, index) in props.componentObject?.lineInfo"
      :key="index"
      :itemInfo="item"
      :list="props.componentObject?.baseDataLineList[item.code]"
    ></table-info>
  </div>
</template>

<script setup>
import { ref, onMounted } from 'vue'
import BasicInfo from './compList/basicInfo.vue'
import ContractorInfo from './compList/contractorInfo.vue'
import FileInfo from './compList/fileInfo.vue'
import TableInfo from './compList/tableInfo.vue'
import { useI18n } from 'vue-i18n'
const { t } = useI18n() // 中英文
const props = defineProps({
  value: [String, Array, Number], //acitveName 值
  componentObject: {
    // 返回的对象值
    type: Object,
    default() {
      return {}
    }
  }
})
</script>

<style lang="scss" scoped>
.appForm{
  margin-top: 20px;
}
.contract_base_title {
  margin: 14px 0;
}

.textoverflow {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.address {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  .address_item {
    width: 48.5%;
    height: 138px;
    background: #ffffff;
    border-radius: 2px;
    border: 1px solid #ebebeb;
    margin-right: 12px;
    margin-bottom: 12px;
    .address_item_title {
      font-size: 16px;
      color: #333;
      font-weight: 550;
      margin: 12px 16px;
      .address_item_title_bg {
        width: 48px;
        height: 24px;
        display: inline-block;
        background: var(--el-color-primary);
        border-radius: 2px;
        line-height: 24px;
        text-align: center;
        font-size: 12px;
        color: #ffffff;
        font-weight: 400;
        margin-right: 12px;
      }
    }
    .address_item_adr {
      font-weight: 400;
      color: #666666;
      font-size: 14px;
      margin: 0px 16px 12px 16px;
    }
  }
  .address_item:nth-child(even) {
    margin-right: 0px;
  } // 对方
  .address_item_title_bg_blue {
    background: #0077ff !important;
  }
}

.file_wrap {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  .file_tiem {
    width: 48.5%;
    height: 96px;
    background: #ffffff;
    border-radius: 2px;
    border: 1px solid #ebebeb;
    margin-right: 12px;
    margin-bottom: 12px;
    display: flex;
    .file_tiem_l {
      margin-left: 24px;
      margin-top: 30px;
      .file_tiem_l_img {
        width: 32px;
        height: 32px;
      }
    }
    .file_tiem_c {
      min-width: 70%;
      margin-top: 30px;
      margin-left: 12px;
      .file_tiem_c_top {
        font-size: 14px;
        color: #333;
        width: 100%;
        margin-bottom: 8px;
      }
      .file_tiem_c_botm {
        font-size: 12px;
        color: #999;
      }
    }
    .file_tiem_r {
      margin-top: 30px;
      margin-left: 12px;
      margin-right: 16px;
      cursor: pointer;
      .file_tiem_r_img {
        width: 32px;
        height: 32px;
      }
    }
  }
  .file_tiem:nth-child(even) {
    margin-right: 0px;
  }
}

.contTable {
  width: 99%;
}
</style>
